//@ts-ignore
import knightPng from "res://assets/knight.png";
import BaseSprite from "./base_sprite";
export default class KnightSprite extends BaseSprite {
    constructor() {
        // 构造函数必须先调用super()
        super();
        this.frameIndex = 10;
        this.frameStart = 10;
        this.frameEnd = 19;
        this.texture = knightPng;
        this.position = new godot.Vector2(300, 300);
        this.set_hframes(10);
        this.set_vframes(2);
        this.set_frame(this.frameIndex);
    }
    _process(delta) {
        // 动画效果
        if (this.frameIndex < 20) {
            this.frameIndex = this.frameIndex + 0.3;
        }
        else {
            this.frameIndex = this.frameStart;
        }
        this.set_frame(Math.floor(this.frameIndex));
        // 父类基础
        super._process(delta);
    }
}
//# sourceMappingURL=knigt_sprite.jsx.map